#include "linux/sched.h"
#include "linux/prosser.h"
#include "linux/sched.h"
#include "linux/timer.h"
#include "linux/common.h"
#include "linux/error.h"
#include "linux/slab.h"
#include "linux/mm.h"
#include "linux/thread_info.h"

#include "asm/pgtable.h"


unsigned int switch_current_mm(void)
{
    if (old_task && (old_task->mm == current->mm))
        return 0;
    else if (current->mm)
        return (unsigned int)current->mm->pgd;
    
    return 0;
}

void preempt_schedule_irq(void)
{
    schedule();
    current->flags &= ~_TIF_NEED_RESCHED;
}